package com.opentae.data.mall.interfaces;

import com.opentae.core.mybatis.config.MyBatisRepository;
import com.opentae.core.mybatis.mapper.Mapper;
import com.opentae.data.mall.pojo.MallUserDto;
import com.opentae.data.mall.beans.ManagerMallUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.List;

/**
 * 
 * Created by exampleCreater.
 */
@MyBatisRepository("tae_mall_managerMallUserMapper")
@Scope("singleton")
@Lazy(true)
public interface ManagerMallUserMapper extends Mapper<ManagerMallUser> {
    /**
     * @description 根据用户名查 找
     *  条件 loginname or telephone
     * @author 郭尔
     * @date 2019/2/13 16:50
     */
    ManagerMallUser selUserByName(@Param("username") String username);

    /**
     *
     * @description 查询用户
     * @author 郭尔
     * @date 2019-06-12 18:34
     */
    List<MallUserDto> userList(@Param("start")Integer start,@Param("offset")Integer offset,
                               @Param("telephone")String telephone, @Param("wxNick")String wxNick,
                               @Param("nick")String nick, @Param("userType")Integer userType,
                               @Param("vipLevel")Integer vipLevel, @Param("mallUserId")String mallUserId,
                               @Param("agentId")String agentId, @Param("sortOrder")String sortOrder);
    int countUser(  @Param("telephone")String telephone, @Param("wxNick")String wxNick,
                    @Param("nick")String nick, @Param("userType")Integer userType,
                    @Param("vipLevel")Integer vipLevel, @Param("mallUserId")String mallUserId,
                    @Param("agentId")String agentId);
}
